package com.niit.session4;

public class Sum1 {
//	方法的重载
	public static int sum(int a, int b) {
		System.out.println(a + b);
		return a+b;
	}
	public static void sum(int a, int b,int c) {
		System.out.println(a + b+c);
	}
	public static void sum(int a, int b,int c,int d) {
		System.out.println(a + b+c);
	}
	public static void sum(double a, double b) {
		System.out.println(a + b);
	}
	public static void main(String[] args) {
		sum(1,2);
		sum(1.0,2.0);
		sum(1, 2, 3);
	}

}
